<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<head>
    <meta charset="UTF-8">
    <title>博客天下</title>
</head>
<body background="img/bolg.jpg">

<div th:replace="commons/bar::topbar"></div>
    <h3 th:text="${bolg.title}"></h3>
    <header th:text="${bolg.userName}"></header>
    <h6 th:text="${#dates.format(bolg.data,'yyyy-MM-dd')}"></h6>
    <h5 th:text="${bolg.information}"></h5>
    <footer>点赞数：<a th:text="${bolg.up}"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;踩：<a th:text="${bolg.low}"></a></footer><br/>
    <div>
        <div class="left-arrow" style="width: 300px;float: left">
            <button  style="color: aqua" >
                &zwj;&zwj;<a th:href="@{'/bolgup?id='+${bolg.id}}">顶</a>
            </button>
        </div>
        <div class="right-arrow" style="width: 300px;float: right" >
            <button style="color: bisque">
                <a th:href="@{'/bolglow?id='+${bolg.id}}">👎</a>
            </button>
        </div>
        <a th:text="${msg}"></a>
    </div><br/>
    <div style="font-size:13px">
        <form action="/sendcolmn" method="post">
            评论:<textarea rows="10" cols="100%" name="information" placeholder="请输入评论...."></textarea><br>
            sumbit:<input type="submit" value="sumbit">
        </form>
    </div>
<div class="row clearfix">
    <div class="col-md-12 column">
        <table class="table table-hover table-striped">
            <thead>
            <tr>
                <th>发表人</th>
                <th>内容</th>
                <th>时间</th>
                <th>删除</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="comn:${comns}">
                <td th:text="${comn.username}">::</td>
                <td th:text="${comn.information}"></td>
                <td th:text="${#dates.format(comn.data,'yyyy-MM-dd')}"></td>
                <td>
                    <a th:href="@{'/comn/delete?id='+${comn.id}}">删除</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<!--传入bolg的ID-->
<a th:href="@{'/test/pay?bolgID='+${bolg.id}}"> 打赏作者</a>
    <a href="/home"></a>
</div>

</body>
</html>